package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Membershiptype;
import com.pets.springboot_petshop.mapper.MembershiptypeMapper;
import com.pets.springboot_petshop.service.MembershiptypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class MembershiptypeServiceImpl implements MembershiptypeService {
    @Autowired
    private MembershiptypeMapper membershiptypeMapper;


    @Override
    public List<Membershiptype> selectMembershiptype(String name) {
        return membershiptypeMapper.selectMembershiptype(name);
    }

    @Override
    public List<Membershiptype> findAll() {
        return membershiptypeMapper.findAll();
    }

    @Override
    public int addMembershiptype(Membershiptype membershiptype) {
        return membershiptypeMapper.addMembershiptype(membershiptype);
    }

    @Override
    public int deleteMembershiptypeById(int id) {
        return membershiptypeMapper.deleteMembershiptypeById(id);
    }

    @Override
    public int updateMembershiptypeById(Membershiptype membershiptype) {
        return membershiptypeMapper.updateMembershiptypeById(membershiptype);
    }
}
